﻿using System.Windows;

namespace Gmantis.Controls.DataGrid
{
    internal sealed class TwoMembersRecyclingKey
    {
        // Fields
        private object firstRecyclingKey;
        private Style firstStyle;

        // Methods
        public TwoMembersRecyclingKey(object firstRecyclingKey, Style firstStyle)
        {
            this.firstRecyclingKey = firstRecyclingKey;
            this.firstStyle = firstStyle;
        }

        public override bool Equals(object obj)
        {
            TwoMembersRecyclingKey key = obj as TwoMembersRecyclingKey;
            return (((key != null) && this.firstRecyclingKey.Equals(key.firstRecyclingKey)) && object.Equals(this.firstStyle, key.firstStyle));
        }

        public override int GetHashCode()
        {
            int hashCode = this.firstRecyclingKey.GetHashCode();
            if (this.firstStyle != null)
            {
                hashCode ^= this.firstStyle.GetHashCode();
            }
            return hashCode;
        }
    }
}
